import Vue from 'vue'
import VueRouter from 'vue-router'
import alls from '../views/all/all.vue'
import lianxi from '../views/lianxi/lianxi.vue' 
import wxy from '../views/wxy/wxy.vue'
import myc from '../views/myc/index.vue'
import s from '../views/myc/s.vue'
import indexs from '../views/myc/home/indexs.vue'
import detail from "../views/myc/home/datail.vue"
import fdj from "../views/myc/home/fdj.vue"
import wyys from '../views/wyy/wyy.vue'

import personalCenter from './personal'
Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/alls',
  },
  {
    path: '/alls',
    name: 'alls',
    component: alls,
  
    children: [{
        path: 'lianxi',
        name: 'lianxi',
        component: lianxi,
      },
      {
        path: 'wxy',
        name: 'wxy',
        component: wxy,
      },
      {
        path: 'wyys',
        name: 'wyys',
        component: wyys,
      }
    ]
  },
  {
    path: '/myc',
    name: 'myc',
    component: myc,
    redirect: '/myc/indexs',
    children: [{
        path: 'indexs',
        name: 'indexs',
        component: indexs,
      },
      {
        path: "detail",
        name: 'detail',
        component: detail
      },
      {
        path: "fdj",
        name: "fdj",
        component: fdj
      }
    ]
  },
  {
    path: '/s',
    name: 's',
    component: s,
  },
  
  ...personalCenter,
  
  ]

const router = new VueRouter({
  routes
})

export default router